# You can use replace and pass the strings to find/replace as dictionary keys/items: df.replace({'\n': '<br/>'}, regex=True)